% preamble
\documentclass[a4paper,12pt]{report}

% some helpful usepackages

\usepackage[english]{babel}
% \usepackage[nynorsk]{babel}
% \usepackage[norsk]{babel}
% \usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{natbib}
\usepackage{listings}
\usepackage{url}
\usepackage{color}

\addtolength{\evensidemargin}{-1cm}
\addtolength{\oddsidemargin}{-1cm}
\addtolength{\textwidth}{2cm}

%%---------------------LAYOUT---------------------
\usepackage{fancyhdr}
\setlength{\headheight}{15pt}
 
\pagestyle{fancyplain}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
 
\lhead{\fancyplain{}{\thepage}}
\chead{}
\rhead{\fancyplain{}{\textit{\leftmark}}}
\lfoot{}
\cfoot{}
\rfoot{}

%-------------------------------------------------

\begin{document}

%titlepage
\title{My first \LaTeX-script \\ [3.0ex]
\huge{Exercise}
}
\author{[Your name]}
\date{IFT, University of Bergen \\ 
\today}

\maketitle

\tableofcontents
\listoffigures
\listoftables


\begin{abstract}
\textbf{THIS IS THE EXERCISE:} Reproduce this document as closely as you can. Some things are more difficult than others! You will need to add several \verb|\usepackages| and google quite a bit. Start with the easier parts. Good Luck!
\end{abstract}

\chapter*{Acknowledgements}
\addcontentsline{toc}{chapter}{Acknowledgements}
This LaTeX script is modified from the original version of Stephanie Mayer from the course GEOF301, Introduction Course to the Degree of Master~\cite{GEOF301}. 

\chapter{Introduction}
\section{My first text}\label{sec: Intro}

Hello world!


\chapter{Environments}
\section{More stuff}
Quite often you want to refer to a former \\
section or chapter. For example: As discussed in chapter \ref{sec: Intro} we can assume ...

\section{Footnotes}
Footnotes\footnote{This is a footnote.} are often used by people using \LaTeX.

\section{List}

\subsection{itemizing}
\begin{itemize}
 \item milk
 \item bread
 \item cheese
\end{itemize}

\begin{enumerate}
 \item milk
 \item bread
 \item cheese
\end{enumerate}

\newpage
\begin{description}
 \item [milk] I like milk in my coffee.
 \item [bread] I like to bake bread.
 \item [cheese] I like Swiss cheese.
\end{description}

\newpage
\section{Mathematics}
You can write mathematical formulae like this: $ax^{2} + bx + c = 0$. \\
or \\
if you want to have your equations seperately with a number you can do it like this:

\begin{equation}\label{eq: my first equation}
 ax^{2} + bx + c = 0
\end{equation}
As in equation \ref{eq: my first equation} ...

Several equations with one label.
\begin{equation}
 \begin{gathered}
  ax + b = 0 \\
  ax^{2} + bx + c = 0 \\
  ax^{3} + bx^{2} +cx + d = 0
 \end{gathered}
\end{equation}

\section{Tables}

\begin{table}[!htbp]%\label{tab: relevant angles}
 \begin{center}
  \caption{Overview over required angles for airborne wind measurements.}
  \label{tab: relevant angles}
\begin{tabular}{ccc}
\toprule
{\bf symbol} &  {\bf name} & {\bf range} \\
\midrule
$\alpha$ & angle of attack & $-\pi < \alpha \le \pi$ \\
$-\beta$ & angle of sideslip & $-\pi/2 \le \beta \le \pi$ \\
\bottomrule
\end{tabular}
\end{center}
\end{table}

As seen in Table \ref{tab: relevant angles}. 

\newpage
\section{Figures}

\begin{figure}[!htbp]
\centering
\includegraphics[width=.6\textwidth]{LOGO_eng.pdf} \\
\includegraphics[scale = .6, angle = 180]{LOGO_eng.pdf} \\

\vspace{2cm}
\includegraphics[scale = .5]{LOGO_eng.pdf} \hspace{1cm}
\includegraphics[scale = .5]{LOGO_eng.pdf} \\
\vspace{1cm}

\includegraphics[height=.1\textheight, angle=90]{LOGO_eng.pdf} \hspace{1cm}
\includegraphics[height=.1\textheight, angle=90]{LOGO_eng.pdf} \hspace{1cm}
\includegraphics[height=.1\textheight, angle=90]{LOGO_eng.pdf} \hspace{1cm}
\caption{Logo of the Faculty of Mathematics and Natural Sciences.}
\label{fig: logos}
\end{figure}

\section{Special letters}
{\O}, {\o}, {\AE}, {\ae}, \r{A}, \r{a}.\\
There is also support for Norwegian letters if you use the right usepackage (s. preamble).\\
ØÅÆ
\newline
Greek letters: $\phi$, $\theta$, $\Gamma$, $\delta$. 
\newline
Special characters: \%, \&, \#, \textbackslash



\chapter{Referencing}
As in~\citet{Lamport1994}. \\
%As in \citet{Texeira2008}. 

\appendix
\chapter{Some source code}
Input the code \verb|sample_python.py| (available at \url{http://code.google.com/p/master-101/}). It should look something like this:

\lstinputlisting{sample_python.py}
 
%----------------------------------------
% list with your references
\begin{thebibliography}{99}
\bibitem{GEOF301}
GEOF 301, \emph{Introduction Course to the Degree of Master}, 2010
\bibitem{Lamport1994}
Leslie Lamport,
\emph{\LaTeX: A Document Preparation System}.
Addison Wesley, Massachusetts,
2nd Edition,
1994.

\end{thebibliography}
%---------------------------------------
%  more elegant is to use BibTeX
% \bibliographystyle{plainnat}
% \bibliography{references}
%---------------------------------------
%% if your file is getting to long, you can divide it in several pieces 
%% and include them into the master file
% \include{intro}
% \include{theory}
% \include{environment}
% \include{appendix}

\end{document}
